
const Permission = {
	bind: (el, binding, vnode, oldVnode) => {
		let permissions = ["1", "2", "3", "4"];
		let permission = binding.value; // 获取到 v-permission的值
		if (permission) {
			let hasPermission = permissions.includes(permission);
			if (!hasPermission) {
				// 没有权限 移除Dom元素
				return el.parentNode && el.parentNode.removeChild(el);
			}
		}
	}
};

export default Permission;
